//
//  TestView.swift
//  JonCalculator
//
//  Created by shiyanjun on 2023/1/13.
//

import SwiftUI

struct TestView: View {
    @State var arr: [Int] = [1, 2]
    @State var sum: Int = 0
    
    var body: some View {
        
        VStack {
            for e in arr {
                Text("\(e)")
            }
        }
    }
}

func loop(arr: [Int]) {
    arr.forEach { e in
        print(e)
    }
}

struct TestView_Previews: PreviewProvider {
    static var previews: some View {
        TestView()
    }
}
